#include "common.h"
#include "resultlistmodel.h"

int ResultListModel::rowCount ( const QModelIndex & parent ) const
{
	return strList.size();
}

QVariant ResultListModel::data ( const QModelIndex & index, int role ) const
{
	if ( role == Qt::DisplayRole )
		return strList.value ( index.row ());
	else return QVariant ();
}

void ResultListModel::clear ()
{
	strList.clear ();
}

void ResultListModel::addResult ( QString & str )
{
	strList.append ( str );
}
